package com.itheima.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 分页结果封装对象
 */
@Data
@ApiModel("分页结果封装对象")
public class PageResult implements Serializable{
    @ApiModelProperty("当前页码")
    private Integer pageNum;//当前页码
    @ApiModelProperty("每页数据量")
    private Integer pageSize;//每页数据量
    @ApiModelProperty("总页数")
    private Long pages;//总页数
    @ApiModelProperty("总记录数")
    private Long total;//总记录数
    @ApiModelProperty("当前页结果")
    private List results;//当前页结果
    public PageResult(Long total, List records) {
        super();
        this.total = total;
        this.results = records;
    }

    public PageResult() {
    }
}
